home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD Concept 6
/
CD Concept 06.iso
/
mac
/
UTILITAIRE
/
RLaB
/
toolbox
/
rem.r
< prev
next >
Wrap
Text File
|
1994-05-21
|
481b
|
19 lines
//-------------------------------------------------------------------//
//
// Syntax: rem ( A, B )
// Description:
// Calculate remainders.
// `mod ( A, B )' is equivilant to `rem ( A, B)'. Mod is a builtin
// function, and is much faster when operating on matrices. Rem is
// provided mostly for MATLAB compatibility.
//-------------------------------------------------------------------//
rem = function(x,y)
{
# return (x-y.*int(x./y));
return mod (x, y);
};